package com.itheima.mongo.pojo;

import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 联想词表
 * </p>
 *
 * @author itheima
 */
/* 注意：如果集合不存在, mongoDB 会自动创建集合名称为 ap_associate_words,
 * 这里使用 Document 指定集合名称时要小心, 若是名字指定错了, 它并不会报错, 而是新建
 */
@Document("ap_associate_words") // 指定该类映射到 MongoDB 中的集合名称, 若省略, 则默认使用类名小写(apassociatewords)
public class ApAssociateWords implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    /**
     * 联想词
     */
    private String associateWords;

    /**
     * 创建时间
     */
    private Date createdTime;

    public ApAssociateWords(String id, String associateWords, Date createdTime) {
        this.id = id;
        this.associateWords = associateWords;
        this.createdTime = createdTime;
    }

    public ApAssociateWords() {
    }

    @Override
    public String toString() {
        return "ApAssociateWords{" +
                "id='" + id + '\'' +
                ", associateWords='" + associateWords + '\'' +
                ", createdTime=" + createdTime +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAssociateWords() {
        return associateWords;
    }

    public void setAssociateWords(String associateWords) {
        this.associateWords = associateWords;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }
}